﻿{include file="public/header"}
<title>店长列表</title>
</head>
<body>
<nav class="breadcrumb">
    <i class="Hui-iconfont">&#xe67f;</i> 首页
    <span class="c-gray en">&gt;</span> 合伙人管理
    <span class="c-gray en">&gt;</span> 提现列表列表
    <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a>
</nav>
<div class="page-container">
    <form method="get">
        <div class="ch-c">
            <div class="ch-form-row">
                <p>注册时间:</p>
                <input type="text" name="start_time" id="countTimestart" onfocus="selecttime(1)" size="17" class="date" 
                readonly value="<?php echo isset($data['start_time'])?$data['start_time']:''?>">
                <b>-</b>
                <input type="text" name="end_time" id="countTimeend" onfocus="selecttime(2)" size="17" class="date" 
                readonly value="<?php echo isset($data['end_time'])?$data['end_time']:''?>">
            </div>
            <select name="status" class="ch-form-cSelect">
                <option value="" >审核状态</option>
                <option value="0">审核中</option>
                <option value="1">已审核</option>
            </select>
            <input type="text" name="mobile" placeholder=" 账号" class="ch-form-assignor" value="<?php echo isset($data['mobile'])?$data['mobile']:''?>">
            <input type="text" name="username" placeholder=" 昵称" class="ch-form-assignor" value="<?php echo isset($data['username'])?$data['username']:''?>">
            <button class="btn btn-success" type="submit"><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
        </div>
    </form>

    <div class="mt-20">
        <div class="title-border">
            <div class="flex1">序号</div>
            <div class="flex1">昵称</div>
            <div class="flex2">电话</div>
            <div class="flex1">状态</div>
            <div class="flex1">提现金额</div>
            <div class="flex2">时间</div>
            <div class="flex1">审核人</div>
            <div class="flex2">操作</div>
        </div>
        {volist name='list' id='vo'}
        <div class="content-border">
            <div class="flex1">{$vo.xian_id}</div>
            <div class="flex1">{$vo.username}</div>
            <div class="flex2">{$vo.mobile}</div>
            <div class="flex1">
                <?php if($vo['start']==0){?>
                审核
                <?php }else{ ?>
                审核通过<?php }?>
            </div>
            <div class="flex1">{$vo.qian}</div>
            <div class="flex2">{:date('Y-m-d H:i:s',$vo.crtime)}</div>
            <div class="flex1">{$vo.admin_id}</div>
            <div class="flex2">
                <?php if($vo['start']==0){?>
                <a class="ch-button ch-green del" data-id="{$vo.xian_id}" href="javascript:;" title="通过">请审核</a>
                <?php }else{?>
                <span class="btn btn-danger">审核通过</span>
                <?php }?>
            </div>
        </div>
        {/volist}
        <div class="pages" style="float: right">{$list->render()}</div>

    </div>
</div>

{include file="public/footer"}
<script type="text/javascript">
    function selecttime(flag) {
        if (flag == 1) {
            var endTime = $("#countTimeend").val();
            if (endTime != "") {
                WdatePicker({dateFmt: 'yyyy-MM-dd', maxDate: endTime})
            } else {
                WdatePicker({dateFmt: 'yyyy-MM-dd'})
            }
        } else {
            var startTime = $("#countTimestart").val();
            if (startTime != "") {
                WdatePicker({dateFmt: 'yyyy-MM-dd', minDate: startTime})
            } else {
                WdatePicker({dateFmt: 'yyyy-MM-dd'})
            }
        }
    }
    /**
     * 删除
     */
    $('.del').click(function () {
        var id=$(this).attr('data-id');
        var obj={};
        obj.xian_id=id;
        var src="{:Url('index/Income/tong')}";
        layer.confirm('确认审核通过吗？', function (index) {
            $.ajax({
                type: 'POST',
                url: src,
                dataType: 'json',
                data: obj,
                success: function (data) {
                    var res=JSON.parse(data);
                    if(res.code==200){
                        layer.msg(res.msg, {icon: 1, time: 2000}, function () {
                            setTimeout("window.location.reload()", 1);
                        });
                    }else{
                        layer.msg(res.msg,{icon: 5,time:1000});
                    }

                },
                error: function (data) {
                    console.log(data.msg);
                },
            });
        });
    });



</script>
</body>
</html>